package com.punch.common.utils;

public class ImageUtil {

    private static final String ossPrefix = "http://punch-pro.oss-cn-beijing.aliyuncs.com";

//    private static final String ossPrefix = "https://upload.aixuefang.com";

    public static String removePrefix(String realPath) {
        return realPath.replace(ossPrefix, "");
    }

    public static String addPrefix(String dataPath) {
        StringBuilder sb = new StringBuilder();
        for (String s : dataPath.split(";")) {
            sb.append(ossPrefix).append(s).append(";");
        }
        sb.deleteCharAt(sb.length() - 1);
        return sb.toString();
    }


}
